import Vue from 'vue'
import Router from 'vue-router'
import Index from '../components/Index'
import Post from '../components/Post'
import Login from '../components/Login'
import MyInfo from '../components/MyInfo'
import Test from '../components/TEST'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: '首页',
      component: Index,
      meta:{
        keepAlive:true
      }
    },
    {
      path: '/post/:topicId',
      name: '帖子',
      component: Post
    },
    {
      path: '/login',
      name: '登录',
      component: Login
    },
    {
      path:'/myinfo',
      name:'我的信息',
      component:MyInfo
    },
    {
      path: '/test',
      name: 'test',
      component: Test
    }
  ]
})
